<!DOCTYPE html>
<html lang="en">
<body>
<div class=" admin-content">
	<div class="daohang">
	</div>
	<div class="admin-biaogelist">
		<div class="listbiaoti am-cf">
			<ul class="am-icon-flag on">添加用户晒单</ul>
			<dl class="am-icon-home" style="float: right;"> 当前位置： 首页 > <a href="#">添加用户晒单</a></dl>
		</div>
		<div class="fbneirong">
			<form class="am-form" method="post" action="<?php echo site_url() . '/Welcome/zio'; ?>">
				<div class="am-form-group am-cf">
					<div class="zuo">头像</div>
					<div class="you" style="height: 45px;">
						<input type="file" id="doc-ipt-file-1">
						<input type="hidden" class="forPicture" name="head">
					</div>
				</div>
				<div class="am-form-group am-cf">
					<div class="zuo">姓名</div>
					<div class="you">
						<input type="text" class="am-input-sm" name="name" placeholder="请输入姓名">
					</div>
				</div>
				<div class="am-form-group am-cf">
					<div class="zuo">身高</div>
					<div class="you">
						<input type="text" class="am-input-sm" name="stature" placeholder="请输入身高">
					</div>
				</div>
				<div class="am-form-group am-cf">
					<div class="zuo">体重</div>
					<div class="you">
						<input type="text" class="am-input-sm" name="weight" placeholder="请输入体重">
					</div>
				</div>
				<div class="am-form-group am-cf">
					<div class="zuo">所在地</div>
					<div class="you">
						<input type="text" class="am-input-sm" name="location" placeholder="请输入所在地">
					</div>
				</div>
				<div class="am-form-group am-cf">
					<div class="zuo">职业</div>
					<div class="you">
						<input type="text" class="am-input-sm" name="occupation" placeholder="请输入职业">
					</div>
				</div>
				<div class="am-form-group am-cf">
					<div class="zuo">照片1</div>
					<div class="you">
						<input type="file" id="doc-ipt-file-2">
						<input type="hidden" class="forPicturr" name="image1">
					</div>
				</div>
				<div class="am-form-group am-cf">
					<div class="zuo">照片2</div>
					<div class="you">
						<input type="file" id="doc-ipt-file-3">
						<input type="hidden" class="forPicturt" name="image2">
					</div>
				</div>
				<div class="am-form-group am-cf">
					<div class="zuo">照片3</div>
					<div class="you">
						<input type="file" id="doc-ipt-file-4">
						<input type="hidden" class="forPictury" name="image3">
					</div>
				</div>
				<div clas="am-form-group am-cf">
					<div class="you" style="margin-left: 11%;">
						<button type="botton" class="am-btn am-btn-secondary am-radius">发布</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>

<script type="text/javascript">
$("#doc-ipt-file-1").change(
	function() {
		var formData = new FormData();
		formData.append('youFile', document.getElementById("doc-ipt-file-1").files[0]);
		var url = "<?php echo site_url();?>" + '/Welcome/upankh';
		$.ajax({
			url : url,
			type : 'POST',
			data : formData,
			dataType : 'json',
			contentType: false,
			processData: false,
			success : function(data) {
				if (data.status != 1) {
					layer.msg('上传失败，请检查文件格式');
				} else {
					$(".forPicture").val(data.filePath);
				}
			}
		});
	}
);
$("#doc-ipt-file-2").change(
	function() {
		var formData = new FormData();
		formData.append('youFile', document.getElementById("doc-ipt-file-2").files[0]);
		var url = "<?php echo site_url();?>" + '/Welcome/upankh';
		$.ajax({
			url : url,
			type : 'POST',
			data : formData,
			dataType : 'json',
			contentType: false,
			processData: false,
			success : function(data) {
				if (data.status != 1) {
					layer.msg('上传失败，请检查文件格式');
				} else {
					$(".forPicturr").val(data.filePath);
				}
			}
		});
	}
);
$("#doc-ipt-file-3").change(
	function() {
		var formData = new FormData();
		formData.append('youFile', document.getElementById("doc-ipt-file-3").files[0]);
		var url = "<?php echo site_url();?>" + '/Welcome/upankh';
		$.ajax({
			url : url,
			type : 'POST',
			data : formData,
			dataType : 'json',
			contentType: false,
			processData: false,
			success : function(data) {
				if (data.status != 1) {
					layer.msg('上传失败，请检查文件格式');
				} else {
					$(".forPicturt").val(data.filePath);
				}
			}
		});
	}
);
$("#doc-ipt-file-4").change(
	function() {
		var formData = new FormData();
		formData.append('youFile', document.getElementById("doc-ipt-file-4").files[0]);
		var url = "<?php echo site_url();?>" + '/Welcome/upankh';
		$.ajax({
			url : url,
			type : 'POST',
			data : formData,
			dataType : 'json',
			contentType: false,
			processData: false,
			success : function(data) {
				if (data.status != 1) {
					layer.msg('上传失败，请检查文件格式');
				} else {
					$(".forPictury").val(data.filePath);
				}
			}
		});
	}
);

$(".am-radius").click(
	function() {
		var head = $(".forPicture").val();
		var image1 = $(".forPicturr").val();
		var image2 = $(".forPicturt").val();
		var image3 = $(".forPictury").val();
	}
);

</script>
<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/polyfill/rem.min.js"></script>
<script src="assets/js/polyfill/respond.min.js"></script>
<script src="assets/js/amazeui.legacy.js"></script>
<![endif]--> 

<!--[if (gte IE 9)|!(IE)]><!--> 
<script src="<?php echo base_url() . 'public/assets/js/amazeui.min.js'; ?>"></script>
<!--<![endif]-->
</body>
</html>